<?php
/**
 * Created by PhpStrom
 * User: 郭碧云
 * Date: 2021/6/22 10:51
 * Desc:
 */

namespace App\Lib\DataTag;


use App\Service\AuthService;

class CategoryDataTag extends BaseDataTag
{
    public function getData($where = []) {
        $data = (new AuthService())->getCategory($where,["id","name","parent_id","code"]);
        //字段处理
        foreach ($data as $key => $d) {
            $data[$key]["name"]="[".$d["id"]."] ".$d["name"];
        }
        return $data;
    }
}
